import { createRouter, createWebHashHistory } from "vue-router"
import Login from '@/views/Login'
import Public from '@/components/Public'
import Person from '@/components/Person'
import Authority from '@/components/Authority'
import QuestionManager from "@/components/QuestionManager.vue";
import QuestionList from "@/components/QuestionList.vue";
import Question from "@/components/Question.vue";
import SubmissionRecord from "@/components/SubmissionRecord.vue";
import Notice from '@/components/Notice.vue'
import Comment from '@/components/Comment.vue'
import System from  '@/components/System.vue'
import ObjectiveQuestion from "@/components/ObjectiveQuestion.vue";
import ObjectList from "@/components/ObjectList.vue";
import Company from "@/components/Company.vue"
import PublicNew from "@/components/PublicNew.vue";
import PersonNew from "@/components/PersonNew.vue";
import Train from "@/components/Train.vue";
import Exam from  "@/components/Exam.vue"
const routes =[
    {
        path:'/login',
        name:'Login',
        component:Login,
        
    },
    {
      path: '/question',
      component: Question
    },
    {
        path:'/public',
        name:'Public',
        component:Public,
        children:[
            {
                path: '',
                redirect:'/public/company'
            },
            {
                path:'objectQuestion',
                component:ObjectiveQuestion
            },
            {
                path:'objectList',
                component:ObjectList
            },
             {
                 path:'person',
                 component:Person
             },
            {
                path:'company',
                component:Company
            },
             {
                 path:'authority',
                 component:Authority
             },
            {
                path:'notice',
                component:Notice
            },
            {
                path:'comment',
                component:Comment
            },
            {
                path:'system',
                component:System
            },
             {
                 path:'questionManager',
                 component:QuestionManager
             },
            {
                path:'questionList',
                component:QuestionList
            },{
                path: 'submissionRecord',
                component: SubmissionRecord
            }
        ]
    },
    {
        path:'/publicnew',
        name:'PublicNew',
        component:PublicNew,
        children: [
            {
                path: '',
                redirect:'/publicnew/personnew'
            },
            {
                path: 'personnew',
                component: PersonNew,
            },
            {
                path: 'train',
                component: Train,
            },
            {
                path: 'exam',
                component: Exam,
            },
            {
                path:'objectQuestion',
                component:ObjectiveQuestion
            },
            {
                path:'objectList',
                component:ObjectList
            },
            {
                path:'questionManager',
                component:QuestionManager
            },
            {
                path:'questionList',
                component:QuestionList
            },
        ]
    },
    {
        path:'/',
        component:Login
    },


]
export default createRouter({
    history: createWebHashHistory(),
    routes
})
